package com.jtpay.sth0409.patternlockdemo.Util;

import android.app.Activity;
import android.content.Context;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by XiaoMieMie on 2017/03/28-14:17.
 */

public class AppUtil  {
    private static List<Activity> activityList=new ArrayList<>();
    private static Context Mcontext;
private static AppUtil appUtil=new AppUtil();

    private AppUtil(){};

    public static AppUtil getInstance(Context context){

        Mcontext=context;

        return appUtil;
    }

public void pushAC(Activity activity){
    activityList.add(activity);
}

public void finishAllAC(){
    for (Activity activity : activityList) {
        activity.finish();
    }
}

}
